import { clsx, type ClassValue } from "clsx"
import { getCookie as getCookieServer, setCookie as setCookieServer } from "cookies-next/server";
import { getCookie as getCookieClient, setCookie as setCookieClient } from "cookies-next/client";
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}


export function setPinYinCookieServer(value: boolean) {
  setCookieServer('pinyin', value?'1':'0');
}
// 1 拼音
export function getPinYinCookieServer() {
  return getCookieServer('pinyin');
}

// 1 拼音
export function getPinYinCookieClient() {
  return getCookieClient('pinyin');
}
export function setPinYinCookieClient(value: boolean) {
  setCookieClient('pinyin', value?'1':'0');
}